#pragma once
#include "EventLoop.h"
#include "ThreadPool.h"

struct TcpServer
{
public:
    TcpServer(uint16_t port, int32_t threadNum);
    ~TcpServer();
    // 初始化监听
    void setListen();
    // 启动服务器
    void run();
    int acceptConnection();

private:

private:
    int32_t m_threadNum;
    EventLoop *m_mainLoop;
    ThreadPool *m_threadPool;
    int32_t m_lfd;
    uint16_t m_port;
};

